import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '../backend/home'
import category from '../backend/catalog/category'
import category_edit from '../backend/catalog/category_edit'

import product from '../backend/catalog/product'
import product_edit from '../backend/catalog/product_edit'

import order from '../backend/sale/order'
import order_edit from '../backend/sale/order_edit'
import order_show from '../backend/sale/order_show'
import customer from '../backend/customer/customer'
import customer_edit from '../backend/customer/customer_edit'
import customer_group from '../backend/customer/customer_group'
import customer_group_edit from '../backend/customer/customer_group_edit'
import setting from '../backend/system/setting'
import payment from '../backend/payment/payment'
import payment_edit from '../backend/payment/payment_edit'
import banner from '../backend/design/banner'
import banner_edit from '../backend/design/banner_edit'
import recommend from '../backend/function/recommend'
Vue.use(VueRouter);

var router = new VueRouter({
    routes: [
        {
            path: '/',
            component: home,

        },
        {
            path: '/catalog/category',
            component: category,

        },

        {
            path: '/catalog/category/edit/:category_id',
            component: category_edit,

        },

        {
            path: '/catalog/category/create',
            component: category_edit,

        },

        {
            path: '/catalog/product',
            component: product,

        },

        {
            path: '/catalog/product/edit/:goods_id',
            component: product_edit,

        },

        {
            path: '/sale/order',
            component: order,

        },

        {
            path: '/sale/order/show/:order_id',
            component: order_show,

        },

        {
            path: '/sale/order/edit/:order_id',
            component: order_edit,

        },
        {
            path: '/sale/order/create',
            component: order_edit,

        },
        {
            path: '/customer/customer',
            component: customer,
        },
        {
            path: '/customer/customer/edit/:customer_id',
            component: customer_edit,
        },
        {
            path: '/customer/customer_group',
            component: customer_group,
        },
        {
            path: '/customer/customer_group/edit/:customer_group_id',
            component: customer_group_edit,
        },
        {
            path: '/customer/customer_group/create',
            component: customer_group_edit,
        },
        {
            path: '/system/setting',
            component: setting,
        },
        {
            path: '/payment/payment',
            component: payment,
        },
        {
            path: '/payment/payment/edit/:payment_id',
            component: payment_edit,
        },
        {
            path: '/design/banner',
            component: banner,
        },
        {
            path: '/design/banner/edit/:banner_id',
            component: banner_edit,
        },
        {
            path: '/design/banner/create',
            component: banner_edit,
        },
        {
            path: '/function/recommend',
            component: recommend,
        },
    ]
});
export default router;